-
Notifications
You must be signed in to change notification settings - Fork 84
140 testing mechanism #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This overwrites input fortran files which can be useful for - testing idempotency (by running tests twice) - tracking formatting changes when tests are failing (by running tests twice with different fprettify versions) Dump original Fortran files into timestamped backup directory
this bug caused 2 test cases to be indeterministic: - RosettaCodeData/Task/Cartesian-product-of-two-or-more-lists/Fortran/cartesian-product-of-two-or-more-lists.f - RosettaCodeData/Task/Evolutionary-algorithm/Fortran/evolutionary-algorithm-1.f
and remove lengthy tests from regular testing
Pull Request Test Coverage Report for Build 19580002316Details
💛 - Coveralls |
README.md
Outdated
| 1. one or more unit tests are added which test formatting of small Fortran code | ||
| snippets, covering all relevant aspects of the added features. | ||
| 2. if the changes lead to failures of existing tests, these test failures | ||
| should be carefully examinated. Only if the test failures are due to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'examinated' -> 'examined'
README.md
Outdated
| in = "Some Fortran code" | ||
| out = "Same Fortran code after fprettify formatting" | ||
|
|
||
| # seleced fprettify command line arguments, as documented in "fprettify.py -h": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'seleced' -> 'selected'
max-models
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any breaking errors. Here and there I saw some points on the python code style which I would have done differently, but I don't think it's worth quibbling over. The PR looks good to me now :)
fprettify/tests/fortrantests.py
Outdated
| output. | ||
| """ | ||
| if cls.n_parsefail + cls.n_internalfail > 0: | ||
| format = "{:<20}{:<6}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are overwriting the built-in function format() with a local variable named format, maybe it would be better if you renamed the variable to fmt or format_string or so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
Is there anything more that needs to be done before merging this? It looks good to me! |
Thanks a lot for your timely review. I checked the changes again myself, and I haven't found anything which would need rework, so I'm going to merge it. I'll keep an eye on possible failures of cron job. EDIT: @max-models I'll wait for your re-review (actually required by our rules). |
Great! Looks good to me, I approved again! |
|
Yes of course. Will do later tonight if that’s okay.
…On Fri, 21 Nov 2025 at 19:06, Patrick Seewald ***@***.***> wrote:
*pseewald* left a comment (fortran-lang/fprettify#188)
<#188 (comment)>
@gnikit <https://github.com/gnikit> or @awvwgk <https://github.com/awvwgk>
could you review as well (or give your ok to merge anyway)?
—
Reply to this email directly, view it on GitHub
<#188 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3FKZFW4FNNDOZD22ERRHT355PDLAVCNFSM6AAAAACLTFRGPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNRUGI3DSOJWG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I finally found time to wrap up refactoring of the testing mechanism, so that it's better maintainable and so that results are more transparent. The new mechanism is documented in
README.md. This fixes #44, fixes #140 and fixes #134.